<?php
namespace Home\Controller;
use Think\Controller;
class WorkController extends PublicController {
    public function __construct(){
        parent::__construct();
    }

    public function index(){
        $data = M('content as a')
            ->join('
                left join room_content_type as rct on a.room_content_type_id = rct.id
                left join type as t on a.type_id = t.id
            left join user as b on a.user_id = b.id 
            left join city as c on b.city_id = c.id '.$join)
            ->where('rct.need_inside_look = 0 and a.status = 1 and a.class_id in (5)')
            ->order('id desc')
            ->page(1,200)
            ->field('a.* , b.nick_name , b.head_ico , c.name as city_name , b.major ,b.school_end_time,b.uuid,b.exp,t.name as type_name')
            ->select();

        $data = D('Content')->parse_contents($data);

        $this->content = $data;
        $this->display();
    }

    

}